﻿using System;
using System.Web.Mvc;
using System.ComponentModel.DataAnnotations;

namespace RedSand.Site.Models
{
    public class NewsInfo
    {
        [Key]
        [HiddenInput(DisplayValue=false)]
        public int NewsID{ get; set; }

        [Display(Name = "Title")]
        public string Title{ get; set; }

        [Display(Name = "Alias")]
        [RegularExpression(@"[a-zA-Z0-9_-]*")]
        [Required]
        public string Alias { get; set; }

        [Display(Name = "Image")]
        public string Image{ get; set; }

        [Display(Name = "Description")]
        public string Description{ get; set; }

        [Display(Name = "Content")]
        public string Content{ get; set; }

        [Display(Name = "CreateDate")]
        [DataType(DataType.Date)]
        public DateTime? CreateDate{ get; set; }

        [Display(Name = "UserID")]
        public int? UserID{ get; set; }

        [Display(Name = "Status")]
        public byte? Status{ get; set; }
    }    
}
